<?php
/**
 * Base_App
 *
 * LICENSE
 *
 * This source file is subject to the new CC-GNU LGPL
 * It is available through the world-wide-web at this URL:
 * http://creativecommons.org/licenses/LGPL/2.1/
 *
 * @category   Base_App
 * @copyright  Copyright (c) 2009 Alexander fanatique* Thomas (me@alexander-thomas.net)
 * @license    http://creativecommons.org/licenses/LGPL/2.1/
 */
class My_View_Helper_GetBuildNumber {
	private $_buildNumber;
	private $_environment;
	
	function __construct(){
		$this->_buildNumber = Zend_Registry::get('build');
		$this->_environment = Zend_Registry::get('environment');
	}
	
	/**
	 * Returns the current build number depending on the current environment.
	 * @return HTML formatted string.
	 */
	public function getBuildNumber() {
		if($this->_environment != 'production')
			return '<p><em>' . $this->_buildNumber . '</em></p>';
		else
			return '<!-- ' . $this->_buildNumber . ' -->';
	}
}
?>